Optimal. Leaf size=68 \[ -\frac {\csc (c+d x)}{a^2 d}-\frac {2 \log (\sin (c+d x))}{a^2 d}+\frac {2 \log (1+\sin (c+d x))}{a^2 d}-\frac {1}{d \left (a^2+a^2 \sin (c+d x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 68, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {2912, 12, 46}
\begin {gather*} -\frac {1}{d \left (a^2 \sin (c+d x)+a^2\right )}-\frac {\csc (c+d x)}{a^2 d}-\frac {2 \log (\sin (c+d x))}{a^2 d}+\frac {2 \log (\sin (c+d x)+1)}{a^2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 46
Rule 2912
Rubi steps
\begin {align*} \int \frac {\cot (c+d x) \csc (c+d x)}{(a+a \sin (c+d x))^2} \, dx &=\frac {\text {Subst}\left (\int \frac {a^2}{x^2 (a+x)^2} \, dx,x,a \sin (c+d x)\right )}{a d}\\ &=\frac {a \text {Subst}\left (\int \frac {1}{x^2 (a+x)^2} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {a \text {Subst}\left (\int \left (\frac {1}{a^2 x^2}-\frac {2}{a^3 x}+\frac {1}{a^2 (a+x)^2}+\frac {2}{a^3 (a+x)}\right ) \, dx,x,a \sin (c+d x)\right )}{d}\\ &=-\frac {\csc (c+d x)}{a^2 d}-\frac {2 \log (\sin (c+d x))}{a^2 d}+\frac {2 \log (1+\sin (c+d x))}{a^2 d}-\frac {1}{d \left (a^2+a^2 \sin (c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.12, size = 45, normalized size = 0.66 \begin {gather*} -\frac {\csc (c+d x)+2 \log (\sin (c+d x))-2 \log (1+\sin (c+d x))+\frac {1}{1+\sin (c+d x)}}{a^2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.13, size = 51, normalized size = 0.75
method | result | size |
derivativedivides | \(\frac {-\frac {1}{\sin \left (d x +c \right )}-2 \ln \left (\sin \left (d x +c \right )\right )-\frac {1}{1+\sin \left (d x +c \right )}+2 \ln \left (1+\sin \left (d x +c \right )\right )}{a^{2} d}\) | \(51\) |
default | \(\frac {-\frac {1}{\sin \left (d x +c \right )}-2 \ln \left (\sin \left (d x +c \right )\right )-\frac {1}{1+\sin \left (d x +c \right )}+2 \ln \left (1+\sin \left (d x +c \right )\right )}{a^{2} d}\) | \(51\) |
risch | \(-\frac {4 i \left (i {\mathrm e}^{2 i \left (d x +c \right )}+{\mathrm e}^{3 i \left (d x +c \right )}-{\mathrm e}^{i \left (d x +c \right )}\right )}{\left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{2} a^{2} d}+\frac {4 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d \,a^{2}}-\frac {2 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{a^{2} d}\) | \(112\) |
norman | \(\frac {-\frac {1}{2 a d}-\frac {\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a d}+\frac {9 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a d}+\frac {9 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a d}}{a \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {2 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \,a^{2}}+\frac {4 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d \,a^{2}}\) | \(134\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 68, normalized size = 1.00 \begin {gather*} -\frac {\frac {2 \, \sin \left (d x + c\right ) + 1}{a^{2} \sin \left (d x + c\right )^{2} + a^{2} \sin \left (d x + c\right )} - \frac {2 \, \log \left (\sin \left (d x + c\right ) + 1\right )}{a^{2}} + \frac {2 \, \log \left (\sin \left (d x + c\right )\right )}{a^{2}}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 104, normalized size = 1.53 \begin {gather*} -\frac {2 \, {\left (\cos \left (d x + c\right )^{2} - \sin \left (d x + c\right ) - 1\right )} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) - 2 \, {\left (\cos \left (d x + c\right )^{2} - \sin \left (d x + c\right ) - 1\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 2 \, \sin \left (d x + c\right ) - 1}{a^{2} d \cos \left (d x + c\right )^{2} - a^{2} d \sin \left (d x + c\right ) - a^{2} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\cos {\left (c + d x \right )} \csc ^{2}{\left (c + d x \right )}}{\sin ^{2}{\left (c + d x \right )} + 2 \sin {\left (c + d x \right )} + 1}\, dx}{a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.44, size = 69, normalized size = 1.01 \begin {gather*} -\frac {\frac {2 \, \log \left ({\left | -\frac {a}{a \sin \left (d x + c\right ) + a} + 1 \right |}\right )}{a^{2}} + \frac {1}{{\left (a \sin \left (d x + c\right ) + a\right )} a} - \frac {1}{a^{2} {\left (\frac {a}{a \sin \left (d x + c\right ) + a} - 1\right )}}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 8.61, size = 136, normalized size = 2.00 \begin {gather*} \frac {4\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )}{a^2\,d}-\frac {2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^2\,d}-\frac {-3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1}{d\,\left (2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+4\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a^2\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________